<template>
  <div>
    <h2>Count:{{ count }}</h2>

    <button @click="$emit('changeCount', -1)">-</button>
    <input type="text" @change="$emit('changeCount',  $event.target.value-count)"/>
    <button @click="$emit('changeCount', 1)">+</button>
  </div>
</template>

<script>
export default {
  name: "Count",
  props: ["count"],
  methods: {},
};
</script>

<style></style>
